<script src="http://www.12301.cc/js/jsorder.js"></script>
<script src="http://www.12301.cc/wx_public/zclip/jquery.zclip.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/member.css"/>
<div class="con_memb">
	<!--个人信息-->
	<div class="conm_box">
		<div class="conmb_img">
			<a href="account_info.html"><img src="<?=$m_info['headphoto']?$m_info['headphoto']:"images/touxiang.png"?>" onerror="javascript:this.src='http://www.12301.cc/images/sorry_pic.png'"class="touxiang" /></a>
			<a href="avatar.html">修改头像</a>
		</div>
		<h4><?=$v['hourT']?>好，<?=$m_info['cname']?>！<span class="passport">(ID:<?=$m_info['account']?>)</span><span class="marlf30">[<a href="enterprise_info.html">编辑个人信息</a>]</span></h4>
		<!-- <p>认证：
			<span class="emailn">邮件</span>
			<span class="teln">手机</span>
			<span class="bankn">银行</span>
			<span class="zfbn">支付宝</span>
		</p> -->
		<p><span>绑定手机：<?=$m_info['mobile']?></span></p>
		<?if(!$m_info['alipay']){?>
		<p style="color:red">您还未绑定支付宝账号 <a href="account_info.html">点击绑定</a></p>
		<?}else{?>
		<p><span>支付宝账号：<?=$m_info['alipay']?></span></p>
		<?}?>
		<p>最近登陆时间：<?=$m_info['lasttime']?></p> 
		<!-- <p>所属联盟：先行联盟</p> -->
		<p><a href="chPs.html" class="mem_pawda">密码修改</a></p>
		<p style=" height:13px;">&nbsp;</p>
		<div class="conmb_ma">
			<img src="http://api.k780.com:88/?app=qr.get&data=http://<?=$_SESSION['account']?>.12301.cc/wx/html/productlist.html&level=H&size=8" class="touxiang_a" />
			<p>扫描此码进入商家店铺</p>
			<!-- <a href="?act=download&txt=http://<?=$_SESSION['account']?>.12301.cc/wx/html/productlist.html">下载二维码</a> -->
		</div>
	</div>
	
	
	
	<!--交易管理-->
    <?if(!$access['yd']):?>
	<div class="conm_box conm_box2 yuer">
		<h4>交易管理</h4>
		<p>
			账户余额：<span class="redn"><?=$v['money']?></span>元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			
            <a href="recharge.html" target="_blank" class="recharge"></a>
			<a href="withdraw.html" target="_blank" class="recharge withdraw"></a></br></br>
			
            <span class="mal100">余额预警开关：</span>
            <span class="yujbtn <?if($cordon) echo 'onyuj'?>" id="yuj" onclick="yue(this);"><!--onyuj-->
            </span>
            <span class="red" id="yufz">预警阈值为<span id="monnum"><?=$cordon?></span>元<a href="#" onClick="locking();">修改</a></span>
		</p>
		<!-- <p>
			支付宝：
			<span class="bluea">1</span>张
			<a href="#" class="bluea">管理</a>
			<a href="#" class="redh">交易记录</a>
			<a href="#" class="redh">应付款账单</a>
			<a href="#" class="redh">应收款账单</a>
		</p> -->
	</div>
    
	<!--平台收费信息-->
	<?if($m_info['dtype']==0){?>
	<div class="conm_box conm_box2 fee">
		<h4>平台收费信息</h4>
		<p>
			<?if($m_info['fee_platform']>0){?>
			<span>平台使用费：<?=$m_info['fee_platform']/100?>元/订单</span>
			<?}?>
			<?if($m_info['fee_bank']>0){?>
			<span>支付手续费：<?=$m_info['fee_bank']?>‰</span>
			<?}?>
			<?if($m_info['fee_sms']>0){?>
			<span>短信收费：<?=$m_info['fee_sms']/100?>元/条(66个字符算一条)</span>
			<?}?>
			<?if($m_info['fee_code']>0){?>
			<span>电子凭证费：<?=$m_info['fee_code']/100?>元/订单</span>
			<?}?>
			
		</p>
		
		<!-- <p>
			支付宝：
			<span class="bluea">1</span>张
			<a href="#" class="bluea">管理</a>
			<a href="#" class="redh">交易记录</a>
			<a href="#" class="redh">应付款账单</a>
			<a href="#" class="redh">应收款账单</a>
		</p> -->
	</div>
	<?}?>
    <?endif;?>
	<?if($m_info['dtype']!=5){?>
	<!--店铺提醒-->
	<div class="conm_box conm_box2">
		<h4>店铺提醒
			<a href="?d=today">今天</a>
			<a href="?d=yesterday">昨天</a>
			<a href="?d=week" >本周</a>
			<a href="?d=lastWeek">上周</a>
			<a href="?d=mon">本月</a>
			<a href="?d=lastMon">上月</a>
		</h4>
		<?if($m_info['dtype']==0&&$m_info['status']==0&&$v['pnums']==0){?>
		<p>您还未发布产品信息，客户根本无法找到您。<a href="prod_type.html" class="redb">立即发布</a></p>
		<?}?>
		<p>
			<span class="redp"><a target="_blank" href="orderReport.html?act=query&begintime=<?=$btime?>&endtime=<?=$etime?>"><?=$dayFlag?>销售订单数</a>(<?=$daySales[0]?>)</span>
			<span class="redp"><a target="_blank" href="orderReport.html?act=query&begintime=<?=$btime?>&endtime=<?=$etime?>"><?=$dayFlag?>销售门票数</a>(<?=$daySales[1]?>)</span>
			<span class="redp"><a target="_blank" href="orderReport.html?act=query&begintime=<?=$btime?>&endtime=<?=$etime?>"><?=$dayFlag?>销售金额</a>(<?=$daySales[2]/100?>)</span>
            <!--<span class="redp"><a href="business_list.html" target="_blank">介绍商家数量</a>(111)</span>-->
			<?if($m_info['dtype']==0){?>
			</br>
			<span class="redp"><a target="_blank" href="prodlists.html">在售产品数</a>(<?=$v['uppronum']?>)</span>
			<!--<span class="redp"><a target="_blank" href="prodlists_s.html">仓库产品数</a>(<?=$v['downpronum']?>)</span>-->
			<span class="redp"><a target="_blank" href="partner.html">合作分销商数</a>(<?=$v['fxnum']?>)</span>
			<span class="redp"><a target="_blank" href="partner.html?dtype=1">合作供应商数</a>(<?=$v['supplynum']?>)</span>
			<?}?>
		</p>
		<!-- <p>
			平台公有帐号 <a href="###" class="grenbtn">立即申请</a> 您当前分销帐号属 <a href="###" class="greenf">福建先行网络服务有限
			公司</a> 私有！
		</p>
		<p>您可申请为平台公有帐号，让更多供应商找到您。</p> -->
	</div>
	<?}?>
	<!--一周产品变化汇总-->
	<?if($m_info['dtype']==1) include("common/mod_prod_chg.php")?>
	
	<?if($m_info['dtype']!=5){?>
	<!--排行-->
	<div class="rank">
		<div class="ranktit">
			<a href="orderReport.html" target="_blank" class="more">更多>></a>
			<a class="bak bakh"><?=($m_info['dtype']==9)?"当":7?>日产品销售排行</a>
			
		</div>
		<div class="rankcon">
			<table class="ranktab">
				<thead id="rankhd">
					<th>序号</th>
					<th class="tL">产品名称</th>
					<th><span class="sort" onclick="sortTable('offmain',2, true ,this);">订单数</span></th>
					<th><span class="sort" onclick="sortTable('offmain',3, true ,this);">门票数</span></th>
					<th><span class="sort" onclick="sortTable('offmain',4, true ,this);">总金额</span></th>
                    <?if(!$access['yd']):?>
					<th><span class="sort" onclick="sortTable('offmain',5, true ,this);">余额支付</span></th>
                     <?endif;?>
					<th><span class="sort" onclick="sortTable('offmain',6, true ,this);">在线支付</span></th>
					<th><span class="sort" onclick="sortTable('offmain',7, true ,this);">授信支付</span></th>
					<th><span class="sort" onclick="sortTable('offmain',8, true ,this);">现场到付</span></th>
				</thead>
				<tbody id="offmain">
				<?foreach($weekSales as $lid=>$row){?>
				<tr>
					<td><?=++$n?></td>
					<td class="tL"><?=$row['title']?></td>
					<td><?=$row['order']?></td>
					<td><?=$row['tnum']?></td>
					<td><?=$row['money']/100?></td>
					<td><?=$row['pmode0']/100?></td>
					<td><?=$row['pmode1']/100?></td>
					<td><?=$row['pmode2']/100?></td>
					<td><?=$row['pmode3']/100?></td>
				</tr>
				<?}?>
				</tbody>
			</table>
		</div>
	</div>
	<?}?>
	<?include("sale_reportz.html");//折线图?>
</div>
<div class="rig_memb">
    <?if(!$access['yd']):?>
    <div class="sidebar_rigm">
        <h4>系统通知</h4>
        <ul id="noticeList">数据加载中...</ul>
    </div>
	<div class="sidebar_rigm">
        <h4>更新日志</h4>
        <ul id="noticeList">
            <li><a href="noticedone.html" target="">更新内容</a></li>
        </ul>
    </div>
	<? $nosee = array(
		'ifzmp.12301.cc',//部分客户 不需要 右边的常见问题等页面
		'haopiao.12301.cc'	
	);
   if(in_array($h_config[$httphost]['host'],$nosee)){
   
   }else{?>
	<div style=" margin:10px 0;">
		<img src="<?=$h_config[$httphost]['host']=='ty.369trip.cn'?"images/img/gj.jpg":"images/alliance_xian.png"?>" width="200" height="260" />
	</div>
	<div class="xian_join"  onclick="window.location.href='http://www.12301.cc/alliance_join.html?id=3779'"></div> 
	<div class="sidebar_rigm_what">
		<span><p>帮助中心</p></span>
		<ul>
        	<!--<li><a href="u/comque.html" target="_blank">票付通平台如何收费？</a></li>-->
            <li><a href="u/comque2.html" target="_blank">平台都有哪些服务？</a></li>
            <li><a href="u/comque3.html" target="_blank">加入平台都有哪些好处？</a></li>
            <li><a href="u/comque4.html" target="_blank">供应商如何使用平台？</a></li>
            <li><a href="u/comque5.html" target="_blank">分销商如何使用平台？</a></li>
            <li><a href="u/comque6.html" target="_blank">平台如何确保资金安全？</a></li>
            <li><a href="u/comque7.html" target="_blank">修改/取消订单如何退款？</a></li>
            <li><a href="u/comque8.html" target="_blank">平台支持哪些电子票介质？</a></li>
            <li><a href="u/comque9.html" target="_blank">平台支持哪些验票方式？</a></li>
            <li><a href="u/comque10.html" target="_blank">配套设备支持哪些通讯方式？</a></li>
            <li><a href="u/comque11.html" target="_blank">平台配套设备收费吗？</a></li>
		</ul>
	</div>
	<?}?>
    <?endif;?>
    <!--弹出窗口-->
	 <div class="pakpopup" id="popup">
        <h4><a href="#" class="close" onClick="Lock_CheckForm();"></a>设置</h4>
        <div class="pkpcon">
        <form>
            <p>
                余额预警阈值：
                <span class="pkpopint">
                    <span class="pkpopa">
                        <a href="#" class="up"></a>
                        <a href="#" class="down"></a>
                    </span>
                    <input type="text" class="pkpopit" id="pkpopit" onblur="kong();" value="<?=$cordon?>"/>
                </span>
                元
                <span class="poplight" id="poplight"><i></i>金额必须是大于0的整数</span>
            </p>
            <p class="gary">当余额少于该值时将会有短信提醒</p>
            <p style="height:26px; border-bottom:1px dashed #CCCCCC;">&nbsp;</p>
            <p>
                <input type="button" class="popbtn1" />
                <input type="button" class="popbtn2" onClick="Lock_CheckForm();" />
            </p>
        </form>
        </div>
    </div>
</div>
<div class="cl"></div>
</div>
<script>
jQuery(document).ready(function($) {
    $.get('common/mod_notice.php', function(html){
        $("#noticeList").html(html);
    });
   $(".popbtn1").click(function(){
        var pkv = document.getElementById('pkpopit').value;
        if(parseInt(pkv)!=pkv || pkv <= 0){
            document.getElementById('poplight').style.display = 'inline';
            return false;
        }else{
            document.getElementById('poplight').style.display = 'none';
        }
        Lock_CheckForm();
        
        $.post('call/jh_mem.php',{'v':pkv,'action':'warning'}).done(function(response){
            if(response=='ok'){
                //$(".pkpopit").val();
                document.getElementById('yufz').style.display = "inline-block";
                document.getElementById('yuj').className = "yujbtn onyuj";
                document.getElementById('monnum').innerHTML = pkv;
            } else {
                alert(response);
            }
        }).error(function(){
            alert('发生错误，无法保存号码');
        });
   });
});
function yue(ths){
    var yucln = ths.className;
    if(yucln == "yujbtn onyuj"){
        $.post('call/jh_mem.php',{'v':'0','action':'warning'}).done(function(response){
            if(response=='ok'){
                document.getElementById('yufz').style.display = "none";
                ths.className = "yujbtn";
            }
        }).error(function(){
            alert('发生错误，无法保存号码');
        });
        
    }else{
        locking();
    }
}

</script>
<?if( 0 && !isset($_SESSION['dataInited']) ):?>
<script>
    jQuery(document).ready(function($) {
        $.getJSON('call/dataInit.php',function(data){
            //console.log(data);
        });
    });
</script>
<?endif;?>
